package com.matt.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Describle This Class Is 模板详细表
 * @Author ZengMin
 * @Date 2018/12/19 11:54
 * @Company Matt
 */
@Entity
@Table(name = "teaching_templete_detail")
@Data
@JsonIgnoreProperties({ "handler","hibernateLazyInitializer" })
public class TeachingTempleteDetail implements Serializable {

    @Id
    @Column(length = 32)
    private String id;

    @Column(columnDefinition = "datetime COMMENT '创建时间'")
    private Date created = new Date();

    @Column(columnDefinition = "bit(1) default 0 COMMENT '是否禁用'")
    private boolean deleted = false;

    @Column(columnDefinition = "varchar(32) COMMENT '模板id'")
    private String templeteId;

    @Column(columnDefinition = "varchar(32) COMMENT '父级id 针对课程类型下的通用和流程使用'")
    private String parentId;

    @Column(columnDefinition = "varchar(50) COMMENT '模块名称'")
    private String name;

    @Column(columnDefinition = "int(11) COMMENT '类型  1 PAD模块 2 课程模块 3通用子类型 4流程子类型'")
    private int type;

    @Column(columnDefinition = "varchar(50) COMMENT '类型 中文'")
    private String typeVal;

    @Column(columnDefinition = "bit(1) COMMENT '上课后启用 PAD用'")
    private boolean afterCourseStart;

    @Column(columnDefinition = "int(11) COMMENT '子模块类型'")
    private int childType;

    @Column(columnDefinition = "varchar(50) COMMENT '子模块类型中文'")
    private String childTypeVal;

    @Column(columnDefinition = "varchar(32) COMMENT '关联Pad模块id 课程模块用'")
    private String padLinkId;

    @Column(columnDefinition = "bit(1) default 0 COMMENT '是否复数 通用、流程使用'")
    private boolean multi;

    @Column(columnDefinition = "varchar(500) COMMENT '选项/单位'")
    private String chooseItem;

    @Column(columnDefinition = "varchar(32) COMMENT '创建人id'")
    private String createStaffId;

    @Column(columnDefinition = "varchar(10) COMMENT '创建人'")
    private String createStaffName;

    @Column(columnDefinition = "bit(1) default 1 COMMENT '是否显示名称 课程模块使用'")
    private boolean showName = true;

    @Column(columnDefinition = "int(11) default 0 COMMENT '排序'")
    private long sort = 0;

    @Transient
    private List<TeachingTempleteDetail> teachingTempleteChild;

    @Transient
    private List<TeachingTempleteCourseVo> teachingTempleteCourseVos;

}
